﻿/**
 * 病历单添加——caseOrder.addCaseOrder.jsp
 * 2017.12.4
 */
$(function(){
	console.info("加载caseOrder_add.js");
/*	$(top.hangge());
	 var h = $(window).height();
     $('.main').css('height',h-40);
     $('input[type=radio]:checked').css('color','#007cde');*/
     
     //点击提交
    /* $(".btn-success").click(function(){
    	 //提交添加
    	 $.ajax({
 			type: "POST",
 			url: 'caseOrder/saveCaseOrder.do',
 	    	data: {
 	    			hzId:$("#hzId").val(),
 	    			xbs:$("#xbs").val().trim(),
 	    			tw:$('#tw').val(),
 	    			tz:$('#tz').val(),
 	    			xl:$('#xl').val(),
 	    			ssy:44,
 	    			szy:55,
 	    			zd:$("#zd").val().trim()
 	    			},
 			dataType:'json',
 			cache: false,
 			success: function(data){
 				console.info(data);
 				 if("success" == data.msg){
 					setTimeout(alert("添加成功！"),500);
 					 window.location.reload(true);
 				 }else{
 					setTimeout(alert(data.msg),500);
 				 }
 			}
 		});
     });*/
});
/*
function find(){
	//验证患者姓名
	if($("#nav-search-input").val().trim() == ""){
		$("#nav-search-input").tips({
				side:3,
	            msg:'请输入患者姓名',
	            bg:'#AE81FF',
	            time:2
	        });
		$("#nav-search-input").focus();
		return false ;
	}
	
	//验证电话
	 var reg_phone = /^((1[3,8][0-9])|(15[0-35-9])|(14[5,7,9])|(17[0,1,3,5,6,7,8]))\d{8}$/;
	 if( $("#phone").val().trim() == ""){
		 $("#phone").tips({
				side:3,
	            msg:'请输入手机号',
	            bg:'#AE81FF',
	            time:3
	        });
  		 $("#phone").focus();
		 return false;
	 }else if($("#phone").val().trim().length != 11 && !reg_phone.test($("#phone").val().trim())){
		 $("#phone").tips({
				side:3,
	            msg:'手机号格式不正确',
	            bg:'#AE81FF',
	            time:3
	        });
   		 $("#phone").focus();
		 return false;
	 }
	 
	 $.ajax({
			type: "POST",
			url: 'caseOrder/saveCaseOrder.do',
	    	data: {
	    			hzId:$("#hzId").val(),
	    			xbs:$("#xbs").val().trim(),
	    			tw:$('#tw').val(),
	    			tz:$('#tz').val(),
	    			xl:$('#xl').val(),
	    			ssy:44,
	    			szy:55,
	    			zd:$("#zd").val().trim()
	    			},
			dataType:'json',
			cache: false,
			success: function(data){
				console.info(data);
				 if("success" == data.msg){
					setTimeout(alert("添加成功！"),500);
					 window.location.reload(true);
				 }else{
					setTimeout(alert(data.msg),500);
				 }
			}
		});

}
*/